﻿@model TodoApp.ViewModels.TodoListViewModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Todo List</title>
</head>
<body>
    <div>
        <table>
            <tr>
                <th>ID
                </th>
                <th>Name
                </th>
                <th>Priority
                </th>
                <th>Completed
                </th>
            </tr>
            <tbody>
                @foreach (var item in Model.TodoItems)
                {
                    <tr>
                        <td>@Html.DisplayFor(model => item.Id)</td>
                        <td>@Html.ActionLink(item.Name, "Details", new { id = item.Id })</td>
                        <td>@Html.DisplayFor(model => item.Priority)</td>
                        <td>@Html.CheckBoxFor(model => item.IsDone)</td>
                    </tr>
                }
            </tbody>
            <tr>
                <td colspan="4">@Html.ActionLink("Create", "Create", "Home")</td>
            </tr>
        </table>
    </div>
</body>
</html>
